<?php

// mbilling/BillingBundle/Entity/usersLogs.php
namespace mbilling\BillingBundle\Entity;
use Doctrine\ORM\Mapping as ORM;

/*
 1-создание
 2-изменение
 3-удаление
 4-доп заказ на ip
 5-доп заказ на hdd
 6-создание домена для заказа
 7-продление
 8-использование купона
 9-подтверждение оплаты
 */

/**
 * @ORM\Entity
 */
class usersLogs
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $date_time;
    
    /**
     * @ORM\Column(type="string", length=39)
     */
    protected $ip;
      
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_id;
	
    /**
     * @ORM\Column(type="integer")
     */
    protected $action_type_id;

    /**
     * @ORM\Column(type="integer", nullable="TRUE")
     */
    protected $order_id;

    public function __construct()
    {
        $this->setIp(getenv("REMOTE_ADDR"));
        $this->setDateTime(new \DateTime());
    }
    
    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setDateTime($date_time)
    {
        $this->date_time = $date_time;
    }
    public function getDateTime()
    {
        return $this->date_time;
    }

    public function setIp($ip)
    {
        $this->ip = $ip;
    }
    public function getIp()
    {
        return $this->ip;
    }

    public function setUserId($user_id)
    {
        $this->user_id = $user_id;
    }
    public function getUserId()
    {
        return $this->user_id;
    }

    public function setActionTypeId($action_type_id)
    {
        $this->action_type_id = $action_type_id;
    }
    public function getActionTypeId()
    {
        return $this->action_type_id;
    }

    public function setOrderId($order_id)
    {
        $this->order_id = $order_id;
    }
    public function getOrderId()
    {
        return $this->order_id;
    }
}
?>
